#include "StdAfx.h"
#include "vdummyview.h"

VDummyView::VDummyView(const QString& name)
	: VAbstractView(name)
{
}

VDummyView::~VDummyView()
{

}

void VDummyView::activate()
{
	QMenu* m1 = new QMenu("dummyView_m1", this);
	QAction* a = new QAction(QIcon(":/Resources/Icons_se/filenew.png"), "a1", this);
	m1->addAction(a);
	QToolBar* tb1 = new QToolBar(this);
	tb1->addAction(a);

	QAction* a1 = new QAction(QIcon(":/Resources/Icons_se/fileopen.png"), "a2", this);
	m1->addAction(a1);
	tb1->addAction(a1);

	QAction* a2 = new QAction(QIcon(":/Resources/Icons_se/filesave.png"), "a3", this);
	m1->addAction(a2);
	tb1->addAction(a2);

	m_menus.append(m1);
	m_toolbars.append(tb1);
}

void VDummyView::deactivate()
{
	qDeleteAll(m_menus);
	m_menus.clear();
	qDeleteAll(m_toolbars);
	m_toolbars.clear();
}

QList<QMenu*> VDummyView::menu() const
{
	return m_menus;
}

QList<QToolBar*> VDummyView::toolbar() const
{
	return m_toolbars;
}